package com.jia.lidao.network.http.request.impl;

import com.jia.lidao.Constans;
import com.jia.lidao.network.http.request.AbstractRequest;

import org.apache.http.Header;

import java.lang.reflect.Type;
import java.util.List;

/**
 * Created by jia on 18/1/10.
 */

public class ModifyLocationRequest extends AbstractRequest {

    private int id;

    private String street;

    private double longitude;

    private double latitude;

    public ModifyLocationRequest(int id,String street,double longitude,double latitude){
        this.id=id;
        this.street=street;
        this.latitude=latitude;
        this.longitude=longitude;
    }

    @Override
    public String getUrl() {
        return Constans.BASEURL+"merchants/"+id+"/location";
    }

    @Override
    public void initRequestParams() {
            addParam("merchant_id",String.valueOf(id));
            addParam("street",street);
            addParam("longitude",String.valueOf(longitude));
            addParam("latitude",String.valueOf(latitude));
    }

    @Override
    public List<Header> getHeaders() {
        return null;
    }

    @Override
    public Type getResultType() {
        return Void.class;
    }
}
